<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'userselect.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
	<link rel="stylesheet" type="text/css" href="css/common.css">

  </head>
  
  <body>
    <div class="centerdiv">
    	<table id="userselect">
    		<tr id="userselect_title">
    			<td colspan="11">所有客户信息</td>
    		</tr>
    		<tr id="userselect_tabletitle">
    			<th>用户账号</th>
    			<th>用户密码</th>
    			<th>角色</th>
    			<th>真实姓名</th>
    			<th>性别</th>
    			<th>地址</th>
    			<th>电话</th>
    			<th>邮编</th>
    			<th>电子邮件</th>
    			<th>注册时间</th>
    			<th>操作</th>
    		</tr>
    		<s:if test="%{size==0}">
    			<tr>
    				<td colspan="11">还没有用户</td>
    			</tr>
    		</s:if>
    		<s:else>
    			<s:iterator value="%{userList}">
    				<tr align="center">
    					<td><s:property value="username"/></td>
    					<td><s:property value="pwd"/></td>
    					<td><s:property value="privilege"/></td>
    					<td><s:property value="name"/></td>
    					<td><s:property value="sex"/></td>
    					<td><s:property value="address"/></td>
    					<td><s:property value="phone"/></td>
    					<td><s:property value="postcode"/></td>
    					<td><s:property value="email"/></td>
    					<td><s:property value="registerTime"/></td>
    					<td>
    						<a href="jsp_admin_userdetail.action?username=<s:property value='username' />">修改</a>
    						<a href="jsp_admin_userdelete.action?username=<s:property value='username' />">删除</a>
    					</td>
    				</tr>
    			</s:iterator>
    		</s:else>
    	</table>
    </div>
  </body>
</html>
